import java.util.Arrays;



public class Text {

    public static void swap(MyValue myValue1,MyValue myValue2){
        int tmp = myValue1.val;
        myValue1.val = myValue2.val;
        myValue2.val = tmp;

    }

    public static void main(String[] args) {
        MyValue myValue1 = new MyValue();
        myValue1.val = 10;

        MyValue myValue2 = new MyValue();
        myValue2.val = 20;

        System.out.println("交换前"+myValue1.val+" "+myValue2.val);

        swap(myValue1,myValue2);

        System.out.println("交换后"+myValue1.val+" "+myValue2.val);


    }


    public static void main5(String[] args) {
        MyDate myDate = new MyDate();
        myDate.setDate(2025,7,21);
        myDate.printDate();

    }




    public static void main3(String[] args) {
        int[][] array = new int[2][];
        array[0] = new int[3];
        array[1] = new int[5];
        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array[i].length; j++) {
                System.out.print(array[i][j]+" ");
            }
            System.out.println();

        }

    }





    public static void main1(String[] args) {
        int[][] array = {{1,2,3},{4,5,6}};

        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array[i].length; j++) {
                System.out.print(array[i][j]+" ");
            }
            System.out.println();

        }
        System.out.println("行数："+array.length);
        System.out.println("列数："+array[0].length);
        System.out.println("=================");

        for (int[] tmpArray: array) {
            for (int x: tmpArray) {
                System.out.print(x+" ");

            }
            System.out.println();

        }
        System.out.println("===============");
        System.out.println(Arrays.deepToString(array));


    }



}
